package com.google.code.dajly.model;

import java.net.URL;
import java.util.Date;

import junit.framework.TestCase;

public class EntryTest extends TestCase {

	Entry _e = null;
	Date _now = null;
	URL _url = null;
	
	protected void setUp() throws Exception {
		super.setUp();
		this._now = new Date();
		this._url = new URL("http://www.google.com");
		this._e = new Entry("titolo", "descrizione", "autore", this._url, this._now);
	}

	protected void tearDown() throws Exception {
		super.tearDown();
	}

	public void testEntry() {
		assertNotNull(_e);
	}

	public void testGetTitle() {
		assertEquals(_e.getTitle(), "titolo");
	}

	public void testGetMessage() {
		assertEquals(_e.getMessage(), "descrizione");
		
	}

	public void testGetAuthor() {
		assertEquals(_e.getAuthor(), "autore");
	}

	public void testGetStoryURL() {
		assertEquals(_e.getStoryURL(), this._url);
	}

	public void testGetPublishedDate() {
		assertEquals(_e.getPublishedDate(), _now);
	}

}
